<!-- 
1.个秀名妆
<template>
    <div>
        <van-tree-select height="calc(100vh - 60px)" @click-nav="navChange" :items="list" :main-active-index.sync="active">
            <template #content>
                <div class="list">
                    <div class="item" v-for="item in child_list" :key="item.id">
                        <img :src="item.cate_thumb_path == ''?'https://www.geshow.com/m/img/avatar.20d6bf20.jpg' : 'https://oss.geshow.com/'+ item.cate_thumb_path" alt="">
                        <span>
                            {{ item.cate_name }}
                        </span>
                    </div>
                </div>
            </template>
        </van-tree-select>
    </div>
</template>
<script>
import {getCategory} from '@/api/geshou'
export default {
    data() {
        return {
            list: [],
            active:0,
            child_list: []
        }
    },
    methods:{
        navChange(index){
            this.child_list = this.list[index].child_cate;
        },
        getList(){
            getCategory().then(res => {
                this.list = res.data.data.map(item => {
                    item.text = item.cate_name;
                    return item
                })
                this.navChange(0);
            })
        }
    },
    created(){
        this.getList()
    }
}
</script> 
-->

<!-- 
爱慕
<template>
    <div>
        <scrollView height="calc(100vh - 60px)" @onBashBottom="onBashBottom">
            <div class="list">
                <div class="item" v-for="item in list" :key="item.id">
                    <img :src="item.image" alt="">
                </div>
            </div>
        </scrollView>
    </div>
</template>
<script>
import { products } from '@/api/jiaju'
// 引入触底加载组件
import scrollView from '@/components/scrollView.vue'
export default {
    methods: {
        getList(){
            this.objPage.page++;

            products(this.objPage).then(res => {
                // 合并数组
                // this.list = [...this.list,res.data.data]
                this.list = this.list.concat(res.data.data)
            })
        },
        onBashBottom(){
            // console.log(123);
            this.getList()
        }
    },
    created(){
        this.getList();
    },
    data() {
        return {
            list: [],
            objPage: {
                sid: 36,
                keyword: '',
                priceOrder: '',
                salesOrder: '',
                news: 0,
                page: 0,
                limit: 10,
                cid: 27,
            }
        }
    },  
    components:{
        scrollView
    }
}
</script> -->

<template>
    <div>
        <van-tabs v-model="active">
            <template v-for="(item,index) in list">
                <van-tab :key="index" :title="item.name">
                    <div class="list">
                        <div class="item" v-for="items in item.data.list" :key="items.id">
                            <img v-lazy="items.list_img_url" alt="">
                        </div>
                    </div>
                </van-tab>
            </template>
        </van-tabs>
    </div>
</template>
<script>
import {index} from '@/api/aimu'

export default {
    methods: {
        getIndex(){
            index({name: 'wap_index'}).then(res => {
                console.log(res.data.data.json[19].data);
                this.list = res.data.data.json[19].data;
            })
        }
    },
    data() {
        return {
            active:0,
            list: []
        }
    },
    created(){
        this.getIndex()
    }
}
</script>
<style lang="scss" scoped>
    img{
        width: 100vw;
    }
</style>